﻿using System.Collections.Generic;
using System.Xml.Serialization;
using LibraryGuard.Interfaces.Configuration;

namespace LibraryGuard.Configuration
{
	/// <summary>
	/// Unwanted files guard configuration. See <see cref="LibraryGuard.Guards.UnwantedFilesGuard"/>.
	/// </summary>
	public sealed class UnwantedFilesGuard
		: IGuardConfiguration
	{
		#region IGuardConfiguration Members
		/// <inheritdoc />
		[XmlAttribute]
		public bool Enabled { get; set; }
		#endregion

		#region Specific
		/// <summary>
		/// If set, hidden files will be deleted.
		/// </summary>
		[XmlAttribute]
		public bool Hidden { get; set; }

		/// <summary>
		/// Unwanted extensions.
		/// </summary>
		public List<string> Extensions { get; set; }

		/// <summary>
		/// Filenames that will be treated as exceptions - never deleted.
		/// </summary>
		public List<string> Exceptions { get; set; }
		#endregion

		#region Constructors
		public UnwantedFilesGuard()
		{
			this.Extensions = new List<string>();
			this.Exceptions = new List<string>();
		}
		#endregion
	}
}
